package javacafe.serviceimple;

import java.util.List;

import javacafe.dao.SeminarDAO;
import javacafe.dao.WorkshopDAO;
import javacafe.daoimpl.SeminarDAOImple;
import javacafe.daoimpl.WorkshopDAOImple;
import javacafe.dto.event.SeminarDTO;
import javacafe.dto.event.WorkshopDTO;

public class WorkshopServiceImple implements WorkshopDAO {
	private WorkshopDAO workshopDAO;
	private static WorkshopServiceImple workshopService;
	
	private WorkshopServiceImple(){
		workshopDAO = new WorkshopDAOImple();	
	}
	
	public static WorkshopServiceImple getInstance(){
		if (workshopService==null) {
			workshopService=new WorkshopServiceImple();
		}
		return workshopService;
	}
	

	public void setWorkshopDAO(WorkshopDAO workshopDAO) {
		this.workshopDAO = workshopDAO;
	}

	public WorkshopDAO getWorkshopDAO() {
		return workshopDAO;
	}

	@Override
	public boolean addWorkshop(WorkshopDTO dto) {
		// TODO Auto-generated method stub
		return workshopDAO.addWorkshop(dto);
	}


	@Override
	public List<WorkshopDTO> getAllWorkshop() {
		// TODO Auto-generated method stub
		return workshopDAO.getAllWorkshop();
	}


	@Override
	public WorkshopDTO getWorkshop(WorkshopDTO dto) {
		// TODO Auto-generated method stub
		return workshopDAO.getWorkshop(dto);
	}


	@Override
	public boolean updateWorkshop(WorkshopDTO dto) {
		// TODO Auto-generated method stub
		return workshopDAO.updateWorkshop(dto);
	}

	@Override
	public boolean deleteWorkshop(WorkshopDTO dto) {
		// TODO Auto-generated method stub
		return workshopDAO.deleteWorkshop(dto);
	}

	

}
